#include<stdio.h>

int main()
{
    long num;
    int max=-32768;
    printf("Input a number:");
    scanf("%d",&num);
    for(int i=100;i<=999;i++)
    {
        if(i==num)break;
        if(num%i==0)
        {
            max=i;
        }
    }
    printf("The biggest factor with three digits in %d is %d\n",num,max);
}